/*
 * @Description: 使用nodeApi方式配置webpack
 * @Autor: CDKEY
 * @Date: 2021-09-27 23:53:37
 */

const webpack = require('webpack');
const configuration = require('./node/webpack.config.js');

let compiler = webpack(configuration); // 访问 webpack 运行时(runtime)

new webpack.ProgressPlugin().apply(compiler); // 使用构建进度插件

compiler.run(function (err, stats) {
  console.log("webpack启动成功");
  // ...
});
